package com.webxiaohua.pattern.facade;

/**
 * @author shenxinhua
 * @date 2019-06-23 09:58
 * @desc xxx
 */
public class Facade {
    private CPU cpu;
    private Memory memory;
    private HardDisk hardDisk;
    public Facade(){
        this.cpu = new CPU();
        this.memory = new Memory();
        this.hardDisk = new HardDisk();
    }
    public void startComputer(){
        this.cpu.startup();
        this.memory.startup();
        this.hardDisk.startup();
        System.out.println("电脑启动完成");
    }

    public void shutdownComputer(){
        this.cpu.shutdown();
        this.memory.shutdown();
        this.hardDisk.shutdown();
        System.out.println("电脑关机完成");
    }
}
